package com.sc.nft.dao;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sc.nft.entity.MallOrderReconsider;
import com.sc.nft.entity.dto.MallOrderReconsiderAdminDetailDTO;
import com.sc.nft.entity.dto.MallOrderReconsiderAdminPageDTO;
import com.sc.nft.mapper.MallOrderReconsiderMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Repository;

import java.util.Date;


/**
 * @author liGen
 * @version 1.0
 * @date 2024/1/22 2:35 下午
 */
@Slf4j
@Repository
public class MallOrderReconsiderDao extends ServiceImpl<MallOrderReconsiderMapper, MallOrderReconsider> {


    /**
     * 订单复议列表
     *
     * @param pageNo
     * @param pageSize
     * @param daoId
     * @param startTime
     * @param endTime
     * @return
     */
    public Page<MallOrderReconsiderAdminPageDTO> getPage(Integer pageNo, Integer pageSize, Long daoId, Date startTime, Date endTime, String orderNo) {
        return baseMapper.getPage(new Page(pageNo, pageSize), daoId, startTime, endTime, orderNo);
    }

    /**
     * 获取订单复议详情
     *
     * @param id
     * @return
     */
    public MallOrderReconsiderAdminDetailDTO getDetail(Long id) {
        return baseMapper.getDetail(id);
    }

}
